package com.navi.loaddata.core.gpEntity;

import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Objects;

public class WppCshtOpeHisPK implements Serializable {
    private String glassId;
    private String opeId;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp logofTimestamp;

    @Column(name = "glass_id")
    @Id
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Column(name = "ope_id")
    @Id
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Column(name = "logof_timestamp")
    @Id
    public Timestamp getLogofTimestamp() {
        return logofTimestamp;
    }

    public void setLogofTimestamp(Timestamp logofTimestamp) {
        this.logofTimestamp = logofTimestamp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WppCshtOpeHisPK that = (WppCshtOpeHisPK) o;
        return Objects.equals(glassId, that.glassId) &&
                Objects.equals(opeId, that.opeId) &&
                Objects.equals(logofTimestamp, that.logofTimestamp);
    }

    @Override
    public int hashCode() {

        return Objects.hash(glassId, opeId, logofTimestamp);
    }
}
